<template>
	<div class="dialog-container">
		<el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">
			<slot name="content"></slot>
			<span slot="footer" class="dialog-footer">
				<el-button @click="handleClose">取 消</el-button>
				<el-button type="primary" @click="onOK">确 定</el-button>
			</span>
		</el-dialog>
	</div>
</template>

<script>
export default {
	props: {
		dialogVisible: {
			type: Boolean,
			default: () => false
		},
		title: {
			type: String,
			default: () => ''
		}
	},
	methods: {
		handleClose() {
			this.$emit('onCancal');
		},
		onOK() {
			this.$emit('onOk');
		}
	}
};
</script>

<style></style>
